< previous page page_965 next page >

Page 965
4. SELECT * FROM Suppliers WHERE City LIKE ("New York *") and State = "NY"
5. SELECT CustomerMaster.CustomerType, CustomerMaster.Name, CustomerMaster.Address, CustomerMaster.City, CustomerMaster.State, CustomerMaster.Zip FROM CustomerMaster WHERE CustomerMaster.CustomerType = "ABC"
6. SELECT CustomerID, Name FROM CustomerMaster WHERE Left(Name,3) = "AME"
7. SELECT DISTINCT OpenInvoice.CustomerID, CustomerMaster.Name FROM OpenInvoice INNER JOIN CustomerMaster ON OpenInvoice.CustomerID = CustomerMaster.CustomerID ORDER BY OpenInvoice.CustomerID
8. SELECT TOP 5 * FROM OpenInvoice ORDER BY Amount Desc
9. SELECT Name, Phone FROM CustomerMaster WHERE State = "OHIO" UNION SELECT Name, Phone FROM Suppliers WHERE State = "Ohio"
Day 9
Answers to Day 9 Quiz
1. A property is data within an object that describes its characteristics, whereas a method is a procedure that can be performed upon an object. You set a property, and invoke a method.
2. The top level DAO is the DBEngine.
3. You use the RepairDatabase method to repair a database. This command uses the following syntax:
DBEngine.RepairDatabase DatabaseName
4. The syntax for the CompactDatabase method is
DBEngine.CompactDatabase oldDatabase, newDatabase, locale, options
Please note that oldDatabase and newDatabase require the database name and path.
5. Visual Basic creates a default Workspace if you fail to identify one when you open a database.
6. The OpenRecordset method can open data from a data source as a Table, a Dynaset, or a Snapshot.
7. The CreateTableDef method builds a table in a database. The syntax of this statement is
Database.CreateTableDef(table name)
8. Use the Type property of the Field object to display the data type of a table column.

 
< previous page page_965 next page >

If you like this book, buy it!